<div class="widgets">

    <div class="row">
        <div class="col-md-12">
            <form class="row form-inline form-group form-horizontal">
                <div class="btn-group c-fl c-ml">
                    <label>开始时间</label>
                    <div class="c-line-b">
                        <!--<input class="form-control" date-time timezone="UTC" ng-model="dates.listStart" view="date" min-view="date" format="YYYY-MM-DD" date-change="changeDate">-->
                        <div class="dropdown listStart-parent c-date-pick">
                            <a class="dropdown-toggle" id="listStart" role="button" data-toggle="dropdown" data-target=".listStart-parent" href="#">
                                <div class="input-group c-mb-n">
                                    <input type="text" class="form-control input-day" data-ng-model="dates.StartTxt">
                                    <div class="input-group-addon"><i class="fa fa-calendar"></i></div>
                                </div>
                            </a>
                            <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
                                <datetimepicker data-ng-model="dates.Start" data-on-set-time="onTimeSet.start(newDate, oldDate)" data-datetimepicker-config="{ dropdownSelector: '#listStart' , minView:'day' }"/>
                            </ul>
                        </div>
                    </div>
                </div>
                <div class="btn-group c-fl c-ml">
                    <label>结束时间</label>
                    <div class="c-line-b">
                        <!--<input class="form-control" date-time timezone="UTC" ng-model="dates.listEnd" view="date" min-view="date" format="YYYY-MM-DD" date-change="changeDate">-->
                        <div class="c-line-b">
                            <!--<input class="form-control" date-time timezone="UTC" ng-model="dates.listStart" view="date" min-view="date" format="YYYY-MM-DD" date-change="changeDate">-->
                            <div class="dropdown listEnd-parent c-date-pick">
                                <a class="dropdown-toggle" id="listEnd" role="button" data-toggle="dropdown" data-target=".listEnd-parent" href="#">
                                    <div class="input-group c-mb-n">
                                        <input type="text" class="form-control input-day" data-ng-model="dates.EndTxt">
                                        <div class="input-group-addon"><i class="fa fa-calendar"></i></div>
                                    </div>
                                </a>
                                <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
                                    <datetimepicker data-ng-model="dates.End" data-on-set-time="onTimeSet.end(newDate, oldDate)" data-datetimepicker-config="{ dropdownSelector: '#listEnd' , minView:'day' }"/>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="btn-group c-fl c-ml">
                    <label>活动类型</label>
                    <div class="c-line-b">
                        <select class="form-control" ng-model="dates.EventCategory">
                            <!--ng-options="item.nCategoryId as item.strCategoryName for item in activeType"-->
                            <option value="" selected>请选择</option>
                            <option ng-repeat="item in activeType" value="{{ item.nCategoryId }}">{{ item.strCategoryName }}</option>
                        </select>
                    </div>
                </div>
                <div class="btn-group c-fl c-ml">
                    <label>是否公开</label>
                    <div class="c-line-b">
                        <select class="form-control" name="isPublic" ng-model="dates.IsPublic">
                            <option value="-1">请选择</option>
                            <option value="false">私密</option>
                            <option value="true">公开</option>
                        </select>
                    </div>
                </div>
                <button type="submit" class="btn btn-primary" ng-click="screenList()">查询</button>
            </form>
        </div>
    </div>

    <div class="row" ng-if="jsons&&activeType">
        <div class="col-md-12">
            <div ba-panel ba-panel-title="活动列表" ba-panel-class="with-scroll">
                <div class="add-row-editable-table">
                    <button class="btn btn-primary" ng-click="modalListFunc('add')" data-toggle="modal" data-target="#myModal">新增</button>
                    <button class="btn btn-primary" ng-click="openPromptbig()">批量删除</button>
                </div>

                <div class="horizontal-scroll">
                    <div class="form-group">
                        <label>显示几行
                            <select class="btn-group form-control show-tick c-mt-10" title="显示几行"
                                    ng-model="listSize" ng-change="sizeChanged(listSize)"  ng-options="i for i in [5,10,15,20,25]">
                            </select>
                        </label>
                    </div>
                    <table class="table table-hover table-bordered"  width="100%">
                        <thead>
                        <tr class="c-fontwb">
                            <th style="width: 32px;">
                                <label class="custom-checkbox nowrap">
                                    <input type="checkbox" ng-model="choiceCheckbox" ng-change="choiceAllList()">
                                    <span></span>
                                </label>
                            </th>
                            <th style="width: 80px">活动封面</th>
                            <th style="width: 80px;">活动名称</th>
                            <th style="width: 70px">用户ID</th>
                            <th style="width: 80px">活动地址</th>
                            <th style="width: 80px">经度纬度</th>
                            <th style="width: 70px">活动人数</th>
                            <th style="width: 100px;">活动简介</th>
                            <th style="width: 100px;">活动详情</th>
                            <th style="width: 70px;">开始时间</th>
                            <th style="width: 70px;">结束时间</th>
                            <th style="width: 70px;">是否公开</th>
                            <th style="width: 70px;">是否收费</th>
                            <th style="width: 70px;">活动类型</th>
                            <th style="width: 70px;">创建时间</th>
                            <th style="width: 70px;">更新时间</th>
                            <th style="width: 120px;">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr ng-repeat="item in jsons track by $index" class="table-bordered">
                            <td>
                                <label class="custom-checkbox nowrap">
                                    <input type="checkbox" ng-model="item.choosed">
                                    <span></span>
                                </label>
                            </td>
                            <td class=""><img ng-src="{{ appConfig.host+item.CoverImg }}" ng-if="item.CoverImg" alt=""><span ng-if="!item.CoverImg">请上传图片</span></td>
                            <td class="tdwordwrapbw">{{ item.EventName }}</td>
                            <td class="">{{ item.UserName }}</td>
                            <td class="tdwordwrapbw">{{ item.Address }}</td>
                            <td class="tdwordwrapbw">{{ item.Longitude }}<br>{{ item.Latitude }}</td>
                            <td class="tdwordwrapbw">{{ item.MemberCount }}</td>
                            <td class="tdwordwrapbw "><a class="afontcolor" title="{{ item.Summary }}">{{ item.Summary?item.Summary:'无' | activeTextFilter}}</a></td>
                            <td class="tdwordwrapbw"><a class="afontcolor" title="{{ item.Details }}">{{ item.Details?item.Details:'无' | activeTextFilter}}</a></td>
                            <td class="tdwordwrapbw">{{ item.StartDate | date:'yyyy-MM-dd HH:mm'}}</td>
                            <td class="tdwordwrapbw">{{ item.EndDate | date:'yyyy-MM-dd HH:mm'}}</td>
                            <td class="tdwordwrapbw">{{ item.IsPublic?'公开':'私密'}}</td>
                            <td class="tdwordwrapbw">{{ item.isChoice?item.EventCost:'免费'}}</td>
                            <td class="tdwordwrapbw">{{ item.EventCategoryTxt }}</td>
                            <td class="tdwordwrapbw">{{ item.CreateTime | date:'yyyy-MM-dd HH:mm'}}</td>
                            <td class="tdwordwrapbw">{{ item.UpdateTime | date:'yyyy-MM-dd HH:mm'}}</td>
                            <td>
                                <button type="button" class="btn btn-primary btn-xs" ng-click="modalListFunc('put',$index,item.EventId)">修改</button>
                                <button type="button" class="btn btn-danger btn-xs" ng-click="deleteList(item.EventId)">删除</button>
                                <!--<div class="btn-group" uib-dropdown dropdown-append-to-body>-->
                                    <!--<button type="button" class="btn btn-primary btn-xs" uib-dropdown-toggle>-->
                                        <!--活动图片 <span class="caret"></span>-->
                                    <!--</button>-->
                                    <!--<ul uib-dropdown-menu>-->
                                        <!--<li ng-click="modalActiveImg('上传图片',item.EventId,'up',true)"><a href>上传图片</a></li>-->
                                        <!--<li ng-click="modalActiveImg('删除图片',item.EventId,'del',true)"><a href>删除图片</a></li>-->
                                    <!--</ul>-->
                                <!--</div>-->
                                <!--<div class="btn-group" uib-dropdown dropdown-append-to-body>-->
                                    <!--<button type="button" class="btn btn-primary btn-xs" uib-dropdown-toggle>-->
                                        <!--封面图片 <span class="caret"></span>-->
                                    <!--</button>-->
                                    <!--<ul uib-dropdown-menu>-->
                                        <!--<li ng-click="modalCoverImg('上传图片',item.EventId,'up',true)"><a>上传图片</a></li>-->
                                        <!--<li ng-click="modalCoverImg('设置首页',item.EventId,'put',true)"><a>设置首张</a></li>-->
                                        <!--<li ng-click="modalCoverImg('删除图片',item.EventId,'del',true)"><a>删除图片</a></li>-->
                                    <!--</ul>-->
                                <!--</div>-->
                                <button type="button" class="btn btn-primary btn-xs" ng-click="modalCoverImg('活动图片操作',item.EventId,'act',true)">活动图片操作</button>
                                <button type="button" class="btn btn-primary btn-xs" ng-click="modalCoverImg('封面图片操作',item.EventId,'cov',true)">封面图片操作</button>
                            </td>
                        </tr>
                        </tbody>
                        <tfoot>
                        <tr>
                            <td colspan="17" class="text-center">
                                <ul uib-pagination total-items="totalItems" ng-model="listPage" items-per-page="listSize" max-size="maxSize" ng-change="pageChanged(listPage)" class="pagination-sm" boundary-link-numbers="true" rotate="false"></ul>
                            </td>
                        </tr>
                        </tfoot>
                    </table>
                </div>

            </div>
        </div>
    </div>
</div>

<!--增加修改的弹框-->
<!--<div ng-include="'app/pages/active/list/model.html'"></div>-->

<!--删除的弹框-->
<!--<div ng-include="'app/pages/active/list/prompt.html'"></div>-->

<!--图片展示的弹框-->
<!--<div ng-include="'app/pages/active/list/imgshow.html'"></div>-->

<!--裁剪图片-->
<!--<div ng-include="'app/pages/active/list/cropimg.html'"></div>-->